import axios from './axiosConfig';

// let base = '';
let base = 'http://127.0.0.1:8000/qk_deploy/api'

if (process.env.NODE_ENV === 'production') {
  base = 'http://192.168.2.118/qk_deploy/api'
}

export const api_url_base = base

export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res) };

export const getProjectList = params => { return axios.get(`${base}/project/list`)};

export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params });}

export const getDeployProfileList = params => { return axios.post(`${base}/deployprofiles/list`, { params: params });}

export const parseClientData = params => { return axios.post(`${base}/parse_client_data`,{params:params})}

export const cleanTempUrl = params => { return axios.post(`${base}/clean_temp_url`,params)}

export const combineClientData = params => { return axios.post(`${base}/process_combine_client_data`,{params:params})}

export const processUpload = params => { return axios.post(`${base}/process_upload`,{params:params})}

export const getProcessStatus = params => { return axios.post(`${base}/get_process_status`,{params:params})}




// export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };

// export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };

// export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

// export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };

// export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };